﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System;
using System.Runtime.InteropServices;

[CustomEditor(typeof(AutoCode))]
public class AutoCodeEditor : Editor
{
    public override void OnInspectorGUI()
    {
        AutoCode myScript = (AutoCode)target;
        EditorGUILayout.TextField("选择保存路径：", myScript.savePath);
        if (GUILayout.Button("选择保存路径"))
        {
            myScript.savePath = EditorUtility.OpenFolderPanel("选择保存路径", myScript.savePath,"");
            Debug.Log("myScript.savePath ：" + myScript.savePath);
        }
        EditorGUILayout.TextField("作者名字：", myScript.authorName);
        EditorGUILayout.TextField("说明：", myScript.desc);
        if (GUILayout.Button("生成代码"))
        {
            
        }
        if (GUILayout.Button("更新代码"))
        {
            
        }
    }


}
